import 'package:flutter/material.dart'; // 导入依赖包

/// 一个新的页面 --- page
//  StatefulWidget 有状态的

class NewPage extends StatefulWidget {
  @override
  _NewPageState createState() => _NewPageState();
  Widget build(BuildContext context) {
    return Container(
      constraints: BoxConstraints.expand(
        height: Theme.of(context).textTheme.headlineMedium!.fontSize! * 1.1 + 200.0,
      ),
      padding: const EdgeInsets.all(8.0),
      color: Colors.blue[600],
      alignment: Alignment.center,
      transform: Matrix4.rotationZ(0.1),
      child: Text('Hello World',
          style: Theme.of(context)
              .textTheme
              .headlineMedium!
              .copyWith(color: Colors.white)),
    );
  }
}

///
class _NewPageState extends State<NewPage> {
  @override
  Widget build(BuildContext context) {
    return Container(
      width: 200.0,
      height: 200.0,
      color: Colors.greenAccent,
    );
  }
}



